<?php

/* @var $this \yii\web\View */

/* @var $content string */

use backend\assets\IndexAsset;
use yii\helpers\Html;

IndexAsset::register( $this );
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang = "<?= Yii::$app->language ?>">
<head>
	<meta charset = "<?= Yii::$app->charset ?>">

	<meta name = "viewport" content = "width=device-width, initial-scale=1">

	<meta name = "renderer" content = "webkit">

	<link rel = "shortcut icon" href = "/favicon.ico">

    <?= Html::csrfMetaTags() ?>

	<title><?= Html::encode( $this->title ) ?></title>

    <?php $this->head() ?>
	<style>
		.go_back {
			font-size: 12px;
			color: #c2c2c2;
		}
	</style>
	<script>
        $(function () {
            toastr.options = {
                "closeButton": true,
                "debug": false,
                "progressBar": true,
                "positionClass": "toast-top-right",
                "onclick": null,
                "showDuration": "5000",
                "hideDuration": "800",
                "timeOut": "5000",
                "extendedTimeOut": "500",
                "showEasing": "swing",
                "hideEasing": "linear",
                "showMethod": "fadeIn",
                "hideMethod": "fadeOut"
            };
            <?php if( Yii::$app->getSession()->hasFlash( 'success' ) ): ?>
            toastr.success("<?= Yii::$app->getSession()->getFlash( 'success' )?>", 'SUCCESS');
            <?php endif; ?>
            <?php if ( Yii::$app->getSession()->hasFlash( 'error' ) ): ?>
            toastr.error("<?= Yii::$app->getSession()->getFlash( 'error' )?>", 'ERROR');
            <?php endif; ?>
        });
	</script>
</head>

<body class = "fixed-sidebar full-height-layout gray-bg">
	<?php $this->beginBody() ?>
	<?= $content ?>
	<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
